﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteAdmin.master" AutoEventWireup="true" CodeFile="Admin.aspx.cs" Inherits="Admin" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
 
    <cc2:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </cc2:ToolkitScriptManager>

    <asp:Panel runat="server" ID="pnLoiChao" Visible="false">
        Chào mừng bạn đến với trang quản trị website toantamvn
    </asp:Panel>
    <asp:UpdatePanel ID="UpdatePanel4" runat="server">
        <ContentTemplate>
             <asp:Panel runat="server" ID="pnTrangChu" Visible="false">
                <div style="padding-right:10px; padding-top:10px; width:100%">
                    <div style="width:100%; margin-bottom:10px;">
                        <asp:Label runat="server" ID="lbTitle"></asp:Label>
                    </div>
                    <asp:Label runat="server" ID="lbThongBao"></asp:Label>
                    <CKEditor:CKEditorControl ID="edtNoiDung" runat="server" Width="800" Height="650">
                    </CKEditor:CKEditorControl>
                    <asp:Button runat="server" ID="btnTrangChu" CssClass="button medium green" 
                        Text="Cập nhật" onclick="btnTrangChu_Click" />
                </div>       
            </asp:Panel>
        </ContentTemplate>
     <Triggers>
            <asp:PostBackTrigger ControlID="btnTrangChu" />
        </Triggers>
    </asp:UpdatePanel>  
  
<!--Danh muc-->    
    <asp:Panel runat="server" ID="pnDanhMuc" Visible="false" Width="100%">
        <asp:UpdatePanel ID="update1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                 
                <table style="margin-right:20px">
                    <tr>
                        <td>
                            <asp:GridView ID="grvDanhMuc" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" BackColor="White" 
                            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                            PageSize="5" Width="700" onpageindexchanging="grvDanhMuc_PageIndexChanging" 
                                onselectedindexchanged="grvDanhMuc_SelectedIndexChanged" >
                            <RowStyle ForeColor="#000066" />        
                            <Columns>
                                <asp:CommandField SelectText="Chọn" ShowSelectButton="True" />
                                <asp:TemplateField HeaderText="STT">                    
                                        <ItemTemplate>
                                            <asp:Label ID="lbIDDanhMuc" runat="server" Text='<%# Eval("IDDanhMuc") %>' Visible="false" />
                                            <%# Container.DataItemIndex + 1 %>
                                        </ItemTemplate>   
                                </asp:TemplateField>
                                <asp:BoundField DataField="TenDanhMuc" HeaderText="Tên danh mục">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle HorizontalAlign="Center" />
                                </asp:BoundField>                   
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        </td>
                    </tr>
                </table> 
           </ContentTemplate>  
        </asp:UpdatePanel>   
        <br />
        <hr size="1" width="90%" color="#419ffc"/>
        <br />  
        <asp:UpdatePanel ID="update2" runat="server">
            <ContentTemplate>
                <table cellpadding="0" cellspacing="0" width="70%">
                    <tr>
                        <td colspan="2">CHI TIẾT DANH MỤC</td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Label ID="lbBaoLoi" ForeColor="Red" runat="server" Font-Bold="False" Font-Size="Larger"></asp:Label>&nbsp;
                        </td>
                    </tr>     
                    <tr>
                        <td>
                            <asp:Label ID="Label4" Text="Tên danh mục:" runat="server"></asp:Label>&nbsp;
                            <span style="color:red; font-weight:bold">*</span> 
                        </td>
                        <td>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <asp:TextBox ID="txtTenDM" runat="server" Width="500"></asp:TextBox>                  
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ErrorMessage="Bạn chưa nhập tên danh mục" 
                                        ControlToValidate="txtTenDM" Display="None">
                                        </asp:RequiredFieldValidator>
                                    <cc2:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" 
                                            TargetControlID="RequiredFieldValidator1" Enabled="true" runat="server">
                                    </cc2:ValidatorCalloutExtender>                                  
                                </ContentTemplate>
                            </asp:UpdatePanel>               
                        </td>
                    </tr>
                   <tr>
                        <td colspan="2">
                               <br />
                                <asp:Button ID="btnTaoMoi" runat="server" Text="Tạo mới" 
                                CssClass="button small green" onclick="btnTaoMoi_Click"  />
                                <asp:Button ID="btnChinhSua" runat="server" Text="Chỉnh sưả" 
                                CssClass="button small green" onclick="btnChinhSua_Click"  />                    
                                <asp:Button ID="btnXoa" runat="server" Text="Xóa danh mục" 
                                CssClass="button small green" onclick="btnXoa_Click" />
                            <cc2:ConfirmButtonExtender ID="ConfirmButtonExtender4" runat="server"
                                 ConfirmText="Bạn có chắc chắn xóa ?" TargetControlID="btnXoa">
                            </cc2:ConfirmButtonExtender>                     
                        </td>
                    </tr>
         
                </table>
        
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnTaoMoi" />                    
                <asp:PostBackTrigger ControlID="btnChinhSua" />  
                <asp:PostBackTrigger ControlID="btnXoa" />
             </Triggers>
        </asp:UpdatePanel>
    </asp:Panel>
    <!--Danh mục con -->
    <asp:Panel runat="server" ID="pnDanhMucCon" >
        <asp:UpdatePanel runat="server" ID="update3">
            <ContentTemplate>
                <asp:GridView ID="grvDanhMucCon" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" BackColor="White" 
                    BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                    PageSize="5" Width="700" 
                    onpageindexchanging="grvDanhMucCon_PageIndexChanging" 
                    onselectedindexchanged="grvDanhMucCon_SelectedIndexChanged"  >
                    <RowStyle ForeColor="#000066" />        
                    <Columns>
                        <asp:CommandField SelectText="Chọn" ShowSelectButton="True" />
                        <asp:TemplateField HeaderText="STT">                    
                                <ItemTemplate>
                                    <asp:Label ID="lbIDDanhMucCon" runat="server" Text='<%# Eval("IDDanhMucCon") %>' Visible="false" />
                                    <%# Container.DataItemIndex + 1 %>
                                </ItemTemplate>   
                        </asp:TemplateField>
                        <asp:BoundField DataField="TenDanhMucCon" HeaderText="Tên danh mục con">
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>                   
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
        </ContentTemplate>  
    </asp:UpdatePanel>   
        <br />
        <hr size="1" width="90%" color="#419ffc"/>
        <br />  
          
     <asp:UpdatePanel runat="server" ID="UpdatePanel3">
            <ContentTemplate>
            <asp:Panel runat="server" ID="pnChiTietDMCon" Visible="false">
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td colspan="2">CHI TIẾT DANH MỤC CON</td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Label ID="lbBaoLoi1" ForeColor="Red" runat="server" Font-Bold="False" Font-Size="Larger"></asp:Label>&nbsp;
                        </td>
                    </tr>     
                    <tr>
                        <td>
                            <asp:Label ID="Label2" Text="Tên danh mục con:" runat="server"></asp:Label>&nbsp;
                            <span style="color:red; font-weight:bold">*</span> 
                        </td>
                        <td>
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                <ContentTemplate>
                                    <asp:TextBox ID="txtDMCon" runat="server" Width="500"></asp:TextBox>                  
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                        ErrorMessage="Bạn chưa nhập tên danh mục!" 
                                        ControlToValidate="txtDMCon" Display="None">
                                        </asp:RequiredFieldValidator>
                                    <cc2:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server"
                                                TargetControlID="RequiredFieldValidator2" Enabled="true" >
                                    </cc2:ValidatorCalloutExtender>
                                </ContentTemplate>
                            </asp:UpdatePanel>               
                        </td>
                    </tr>
                    <tr>                        
                        <td>Nội dung:</td>
                        <td>
                            <CKEditor:CKEditorControl ID="edtDMCon" runat="server" Height="500" Width="650" ></CKEditor:CKEditorControl>
                        </td>
                    </tr>
                   <tr>
                        <td colspan="2">
                               <br />
                                <asp:Button ID="btnTaoMoiDMCon" runat="server" Text="Tạo mới" 
                                CssClass="button small green" onclick="btnTaoMoiDMCon_Click"   />
                                <asp:Button ID="btnSuaDMCon" runat="server" Text="Chỉnh sửa" 
                                CssClass="button small green" onclick="btnSuaDMCon_Click"  />                    
                                <asp:Button ID="btnXoaDMCon" runat="server" Text="Xóa" 
                                CssClass="button small green" onclick="btnXoaDMCon_Click" />
                            <cc2:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server"
                                     ConfirmText="Bạn có chắc chắn xóa ?" TargetControlID="btnXoaDMCon" >
                            </cc2:ConfirmButtonExtender>                     
                        </td>
                    </tr>
         
                </table>
                 </asp:Panel>
        </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnTaoMoiDMCon" />                    
                <asp:PostBackTrigger ControlID="btnSuaDMCon" />  
                <asp:PostBackTrigger ControlID="btnXoaDMCon" />
             </Triggers>
        </asp:UpdatePanel>
       
    </asp:Panel>
<!-- Tin tuc -->
    <asp:Panel runat="server" ID="pnTinTuc" Visible="false" Width="100%">
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                 
                <table style="margin-right:20px">
                    <tr>
                        <td>
                            <asp:GridView ID="grvTinTuc" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" BackColor="White" 
                            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                            PageSize="5" Width="700" onpageindexchanging="grvTinTuc_PageIndexChanging" 
                                onselectedindexchanged="grvTinTuc_SelectedIndexChanged">
                            <RowStyle ForeColor="#000066" />        
                            <Columns>
                                <asp:CommandField SelectText="Chọn" ShowSelectButton="True" />
                                <asp:TemplateField HeaderText="STT">                    
                                        <ItemTemplate>
                                            <asp:Label ID="lbIDTinTuc" runat="server" Text='<%# Eval("IDTinTuc") %>' Visible="false" />
                                            <%# Container.DataItemIndex + 1 %>
                                        </ItemTemplate>   
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Tin tức">                    
                                        <ItemTemplate>
                                            <span style="color:Red"><%# Eval("TieuDe") %></span> 
                                            <br /><span style="font-size:12px"><%# Eval("GioiThieu")%></span>
                                        </ItemTemplate>   
                                </asp:TemplateField>     
                                 <asp:TemplateField HeaderText="Hình ảnh">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("HinhAnh") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <img src="images/tintuc/<%# Eval("HinhAnh") %>" Width="100px" Height="100px" />
                                    </ItemTemplate>                    
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                </asp:TemplateField>           
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        </td>
                    </tr>
                </table> 
           </ContentTemplate>  
        </asp:UpdatePanel>   
        <br />
        <hr size="1" width="90%" color="#419ffc"/>
        <br />  
        <asp:UpdatePanel ID="up4" runat="server">
            <ContentTemplate>
                <table cellpadding="0" cellspacing="5" width="100%">
                    <tr>
                        <td colspan="2">CHI TIẾT TIN TỨC</td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Label ID="lbBaoLoi2" ForeColor="Red" runat="server" Font-Bold="False" Font-Size="Larger"></asp:Label>&nbsp;
                        </td>
                    </tr>     
                    <tr>
                        <td>
                            <asp:Label ID="Label3" Text="Tiêu đề:" runat="server"></asp:Label>&nbsp;
                            <span style="color:red; font-weight:bold">*</span> 
                        </td>
                        <td>
                            <asp:TextBox ID="txtTieuDe" runat="server" Width="500"></asp:TextBox>                  
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                ErrorMessage="Bạn chưa nhập tiêu đề tin tức!" 
                                ControlToValidate="txtTieuDe" Display="None">
                                </asp:RequiredFieldValidator>
                            <cc2:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server"
                                    TargetControlID="RequiredFieldValidator3" Enabled="true">
                            </cc2:ValidatorCalloutExtender>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label1" Text="Giới thiệu chung:" runat="server"></asp:Label>&nbsp;
                            <span style="color:red; font-weight:bold">*</span> 
                        </td>
                        <td>
                            <CKEditor:CKEditorControl ID="edtGioiThieu" runat="server"  Width="650" ></CKEditor:CKEditorControl>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                ErrorMessage="Bạn chưa nhập giới thiệu tin tức!" 
                                ControlToValidate="edtGioiThieu" Display="None">
                                </asp:RequiredFieldValidator>
                            <cc2:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server"
                                        TargetControlID="RequiredFieldValidator4" Enabled="true" >
                            </cc2:ValidatorCalloutExtender>          
                        </td>
                    </tr>
                    <tr>
                        <td >
                            <asp:Label ID="Label10" Text="Hình ảnh:" runat="server"></asp:Label>&nbsp;                
                        </td>
                        <td >
                            <asp:Image ID="Image1" runat="server" Visible="true" Width="150px" Height="180px" />            
                            <asp:HiddenField ID="HiddenHinhAnh" runat="server" />&nbsp;&nbsp;
                            <asp:FileUpload ID="fileTinTuc" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label5" Text="Nội dung:" runat="server"></asp:Label>&nbsp;
                            <span style="color:red; font-weight:bold">*</span> 
                        </td>
                        <td>
                            <CKEditor:CKEditorControl ID="edtTinTuc" runat="server" Width="650" Height="500" ></CKEditor:CKEditorControl>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                ErrorMessage="Bạn chưa nhập nội dung tin tức!" 
                                ControlToValidate="edtTinTuc" Display="None">
                                </asp:RequiredFieldValidator>
                            <cc2:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server"
                                     TargetControlID="RequiredFieldValidator5" Enabled="true" >
                            </cc2:ValidatorCalloutExtender>        
                        </td>
                    </tr>

                   <tr>
                        <td colspan="2">
                               <br />
                                <asp:Button ID="btnTaoMoiTT" runat="server" Text="Tạo mới" 
                                CssClass="button small green" onclick="btnTaoMoiTT_Click" />
                                <asp:Button ID="btnChinhSuaTT" runat="server" Text="Chỉnh sưả" 
                                CssClass="button small green" onclick="btnChinhSuaTT_Click"  />                    
                                <asp:Button ID="btnXoaTT" runat="server" Text="Xóa tin tức" 
                                CssClass="button small green" onclick="btnXoaTT_Click"/>
                            <cc2:ConfirmButtonExtender ID="ConfirmButtonExtender2" runat="server"
                                        ConfirmText="Bạn có chắc chắn xóa ?" TargetControlID="btnXoaTT" >
                            </cc2:ConfirmButtonExtender>                     
                        </td>
                    </tr>
         
                </table>
        
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnTaoMoiTT" />                    
                <asp:PostBackTrigger ControlID="btnChinhSuaTT" />  
                <asp:PostBackTrigger ControlID="btnXoaTT" />
             </Triggers>
        </asp:UpdatePanel>
    </asp:Panel>
<!--SlideShow-->
    <asp:Panel runat="server" ID="pnSlideShow" Visible="false">
        <asp:UpdatePanel ID="UpdatePanel5" runat="server">
            <ContentTemplate>
                <table style="margin-right:20px">
                    <tr>
                        <td>
                            <asp:GridView ID="grvSlideShow" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" BackColor="White" 
                            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                            PageSize="5" Width="700" onpageindexchanging="grvSlideShow_PageIndexChanging" 
                                onselectedindexchanged="grvSlideShow_SelectedIndexChanged" >
                            <RowStyle ForeColor="#000066" />        
                            <Columns>
                                <asp:CommandField SelectText="Chọn" ShowSelectButton="True" />
                                <asp:TemplateField HeaderText="STT">                    
                                        <ItemTemplate>
                                            <asp:Label ID="lbIDSlideShow" runat="server" Text='<%# Eval("IDHinh") %>' Visible="false" />
                                            <%# Container.DataItemIndex + 1 %>
                                        </ItemTemplate>   
                                </asp:TemplateField>    
                                 <asp:TemplateField HeaderText="Hình ảnh">
                                    <ItemTemplate>
                                        <img src="imgs/<%# Eval("TenHinh") %>" Width="100px" Height="100px" />
                                    </ItemTemplate>                    
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                </asp:TemplateField>   
                                 <asp:BoundField DataField="ChuThich" HeaderText="Chú thích">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle HorizontalAlign="Center" />
                                </asp:BoundField>                                          
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        </td>
                    </tr>
                </table> 
           </ContentTemplate>  
        </asp:UpdatePanel>   

        <asp:UpdatePanel ID="UpdatePanel6" runat="server">
            <ContentTemplate>
                <table cellpadding="0" cellspacing="5" width="100%">
                    <tr>
                        <td colspan="2">CHI TIẾT HÌNH ẢNH SLIDESHOW</td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Label ID="lbBaoLoi3" ForeColor="Red" runat="server" Font-Bold="False" Font-Size="Larger"></asp:Label>&nbsp;
                        </td>
                    </tr> 
                    <tr>
                        <td >
                            <asp:Label ID="Label9" Text="Hình ảnh:" runat="server"></asp:Label>&nbsp;                
                        </td>
                        <td >
                            <asp:Image ID="imgSlideShow" runat="server" Visible="true" Width="150px" Height="180px" />            
                            <asp:HiddenField ID="hdSlideShow" runat="server" />&nbsp;&nbsp;
                            <asp:FileUpload ID="fileSlideShow" runat="server" />
                        </td>
                    </tr>   
                    <tr>
                        <td>
                            <asp:Label ID="lbChuThich" Text="Chú thích:" runat="server"></asp:Label>&nbsp;
                        </td>
                        <td>
                            <asp:TextBox ID="txtChuThich" runat="server" Width="500"></asp:TextBox>                  
                        </td>
                    </tr>
                   <tr>
                        <td colspan="2">
                               <br />
                                <asp:Button ID="btnTaoMoiSlide" runat="server" Text="Tạo mới" 
                                CssClass="button small green" Visible="false" />
                                <asp:Button ID="btnSuaSlide" runat="server" Text="Chỉnh sưả" 
                                CssClass="button small green"  />                    
                                <asp:Button ID="btnXoaSlide" runat="server" Text="Xóa" 
                                CssClass="button small green" />
                            <cc2:ConfirmButtonExtender ID="ConfirmButtonExtender3" runat="server"
                                        ConfirmText="Bạn có chắc chắn xóa ?" TargetControlID="btnXoaSlide" >
                            </cc2:ConfirmButtonExtender>                     
                        </td>
                    </tr>
         
                </table>
        
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnTaoMoiSlide" />                    
                <asp:PostBackTrigger ControlID="btnSuaSlide" />  
                <asp:PostBackTrigger ControlID="btnXoaSlide" />
             </Triggers>
        </asp:UpdatePanel>
    </asp:Panel>
    <!--Add Hieu-HV 30/10/2011 START-->
    <!--Lien Ket Web-->
    <asp:Panel  runat = "server" ID = "pnLienketWeb" Visible = "false">
        <asp:UpdatePanel ID = "UpdatePanel7" runat = "server">
            <ContentTemplate>
                <table style="margin-right:20px">
                    <tr>
                        <td>
                            <asp:GridView ID="grvLienKetWeb" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" BackColor="White" 
                            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                            PageSize="5" Width="700" onpageindexchanging="grvLienKetWeb_PageIndexChanging" 
                                onselectedindexchanged="grvLienKetWeb_SelectedIndexChanged">
                            <RowStyle ForeColor="#000066" />        
                            <Columns>
                                <asp:CommandField SelectText="Chọn" ShowSelectButton="True" />
                                <asp:TemplateField HeaderText="STT">                    
                                        <ItemTemplate>
                                            <asp:Label ID="lbIDLienKetWeb" runat="server" Text='<%# Eval("IDLienKet") %>' Visible="false" />
                                            <%# Container.DataItemIndex + 1 %>
                                        </ItemTemplate>   
                                </asp:TemplateField>    
                                 <asp:TemplateField HeaderText="Hình ảnh">
                                    <ItemTemplate>
                                        <img src="images/lienket/<%# Eval("HinhAnh") %>" Width="100px" Height="100px" />
                                    </ItemTemplate>                    
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                </asp:TemplateField>   
                                 <asp:BoundField DataField="UrlLienKet" HeaderText="URL">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle HorizontalAlign="Center" />
                                </asp:BoundField> 
                                <asp:BoundField DataField="ChuThich" HeaderText="Chú Thích">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle HorizontalAlign="Center" />
                                </asp:BoundField>                                         
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>  
        
        <asp:UpdatePanel ID="UpdatePanel8" runat="server">
            <ContentTemplate>
                <table cellpadding="0" cellspacing="5" width="100%">
                    <tr>
                        <td colspan="2">CHI TIẾT LIÊN KẾT WEB</td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Label ID="lbBaoLoi4" ForeColor="Red" runat="server" Font-Bold="False" Font-Size="Larger"></asp:Label>&nbsp;
                        </td>
                    </tr> 
                    <tr>
                        <td >
                            <asp:Label ID="Label7" Text="Hình ảnh:" runat="server"></asp:Label>&nbsp;                
                        </td>
                        <td >
                            <asp:Image ID="imgLienKetWeb" runat="server" Visible="true" Width="150px" Height="180px" />            
                            <asp:HiddenField ID="hdLienKetWeb" runat="server" />&nbsp;&nbsp;
                            <asp:FileUpload ID="fileLienKetWeb" runat="server" />
                        </td>
                    </tr>   
                    <tr>
                        <td>
                            <asp:Label ID="lbUrl" Text="Url:" runat="server"></asp:Label>&nbsp;
                        </td>
                        <td>
                            <asp:TextBox ID="txtUrl" runat="server" Width="500"></asp:TextBox>                  
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lbChuThichLienKet" Text="Chú Thích:" runat="server"></asp:Label>&nbsp;
                        </td>
                        <td>
                            <asp:TextBox ID="txtChuThichLienKet" runat="server" Width="500"></asp:TextBox>                  
                        </td>
                   </tr>
                   <tr>
                        <td>
                            <asp:Label ID="lbHienThiLienKetWeb" Text="Hiển Thị:" runat="server"></asp:Label>&nbsp;
                        </td>
                        <td>
                            <asp:CheckBox ID = "cbHienThiLienKetWeb"  runat = "server"/>                  
                        </td>
                   </tr>
                   <tr>
                        <td colspan="2">
                               <br />
                                <asp:Button ID="btnTaoMoiLienKetWeb" runat="server" Text="Tạo mới" 
                                CssClass="button small green" OnClick = "btnTaoMoiLienKetWeb_Click" />
                                <asp:Button ID="btnSuaLienKetWeb" runat="server" Text="Chỉnh sửa" 
                                CssClass="button small green" OnClick = "btnSuaLienKetWeb_Click" />                    
                                <asp:Button ID="btnXoaLienKetWeb" runat="server" Text="Xóa" 
                                CssClass="button small green" OnClick = "btnXoaLienKetWeb_Click" />
                            <cc2:ConfirmButtonExtender ID="ConfirmButtonExtender5" runat="server"
                                        ConfirmText="Bạn có chắc chắn xóa ?" TargetControlID="btnXoaLienKetWeb" >
                            </cc2:ConfirmButtonExtender>                     
                        </td>
                    </tr>         
                </table>        
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnTaoMoiLienKetWeb" />                    
                <asp:PostBackTrigger ControlID="btnSuaLienKetWeb" />  
                <asp:PostBackTrigger ControlID="btnXoaLienKetWeb" />
             </Triggers>          
        </asp:UpdatePanel>      
    </asp:Panel>   
    <!--Add Hieu-HV 20/10/2011 END-->
</asp:Content>


